<%if session("username")<>"" then
else
response.write "<script>alert(""请登陆后再进行操作！"");window.location.href='/User/login.asp';</script>"
response.end
end if

Function DelHtml(Str)
    If IsNull(Str) Then Exit Function
    Str = Replace(Str, Chr(10), "")
    Str = Replace(Str, Chr(13), "")
    Dim Pattern
    Pattern = "<[^>]+?>"
    Str = str_replace(Pattern, Str, "")
    Str = Replace(Str, "&nbsp;", "")
    Str = Replace(Str, " ", "")
    DelHtml = Str
End Function

Function stvalue(txt,length)
    txt=trim(txt)
    x = len(txt)
    y = 0
    if x >= 1 then
        for ii = 1 to x
            if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) >255 then '如果是汉字
                y = y + 2
            else
                y = y + 1
            end if
            if y >= length then
                txt = left(trim(txt),ii) '字符串限长
                exit for
            end if
        next
        stvalue = txt
    else
        stvalue = ""
    end if
End Function
%>